from random import randint

def rand_password(count=10,bits=8):
    # 随机密码范围[a-zA-Z0-9]
    ls=list(range(48,58))+list(range(65,91))+list(range(97,123))
    # 初始化随机密码列表
    rand_ls=[]
    for i in range(count):
        password=''
        for j in range(bits):
            password+=chr(ls[randint(0,61)])
        rand_ls.append(password)
    return rand_ls
